<template>
	<div class="container">
		<navigationBar title="系统消息"></navigationBar>
		<div class="content" :style="'padding-top: ' + (navigationBarHeight-1) + 'px;'">
			<div class="list">
				<div class="list-item" v-for="(item,index) in list" :key="index" @click="toSystemDetail(item.id,item)">
					<div class="unread" v-if="!item.readStatus"></div>
					<div class="unread-text" v-else>{{item.readStatus?'已读':'未读'}}</div>
					<div class="title">{{ item.createTime ||item.updateTime}}</div>
					<div class="body">
						<div class="vice-title">
							{{item.title}}
						</div>
						<div class="vice-content">
							{{item.subTitle}}
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</template>

<script>
	import data from '@/js/index/systemMsg/data.js';
	import methods from '@/js/index/systemMsg/methods.js';
	import {
		mapState
	} from 'vuex';
	import navigationBar from '../../components/navigationBar.vue';
	export default {
		data,
		methods,
		onLoad() {
			this.getPageList()
		},
		onReachBottom() {
			this.getPageList()
		},
		onShow() {},
		onHide() {},
		components: {
			navigationBar
		},
		computed: {
			...mapState(['navigationBarHeight', 'userInfo'])
		}
	};
</script>
<style>
	page {
		background-color: rgb(250, 250, 250);
	}
</style>
<style scoped lang="scss">
	@import '~@/style/index/systemMsg.scss';
</style>